Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use event.sender in CallMembership #3793

Merged
merged 2 commits into from
Oct 10, 2023
Merged

Don't use event.sender in CallMembership #3793

merged 2 commits into from
Oct 10, 2023

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Oct 9, 2023

I fell into another js-sdk trap: this is "only guaranteed to be set for events that appear in a timeline" and not state events. It does not say why. We only ever used it to get the sender user ID anyway, so just use getSender().

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

Here's what your changelog entry will look like:

🐛 Bug Fixes

  • Don't use event.sender in CallMembership (#3793).

I fell into another js-sdk trap: this is "only guaranteed to be set
for events that appear in a timeline" and not state events. It does
not say why. We only ever used it to get the sender user ID anyway,
so just use getSender().
Copy link
Contributor

@toger5 toger5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR description. With the description its clear why we use getSender

@dbkr dbkr added this pull request to the merge queue Oct 10, 2023
Merged via the queue into develop with commit c8f8fb5 Oct 10, 2023
27 checks passed
@dbkr dbkr deleted the dbkr/dont_use_sender branch October 10, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants